package com.club325.voicemicroblog.filter;

import java.io.IOException;
import javax.servlet.*;


public class SetCharacterEncodingFilter implements Filter
{
	protected final static String encoding = "utf-8";
	
 	public void init(FilterConfig filterConfig) throws ServletException {
        return;
	}
 	
 	public void doFilter(ServletRequest request, ServletResponse response, 
 			FilterChain chain) throws IOException, ServletException {
 		request.setCharacterEncoding(encoding);
 		response.setContentType("text/html;charset=" + encoding);
        chain.doFilter(request, response);
    }
	
    public void destroy() {
        return;
    }   
}

